<template>
    <div class="table-operator" v-if="isShow">
        <slot></slot>
        <a-tag :color="color" :ref="componentRef">
        {{localText}} 
        </a-tag>
    </div>
</template>
<script>


export default {
    name:'ExtTag',
    components:{},
    props:{
        componentRef:[String,Number],
        color:{
            type:String,
            default:''
        },
        text:{
            type:String,
            default:''
        },
        pageObject:[Object]

    },
    data(){
        return{
          isShow:true,
          localText:this.text
        }
    },
   
    created(){
       this.pageObject["tag"+this.componentRef] = this
    },
    methods:{
        setText(text){
            this.localText=text
        },
        setIsShow(isShow){
            this.isShow=isShow
        },
    }
}
</script>